package org.gdgbologna.devfest;



import java.util.ArrayList;

import org.gdgbologna.resources.Devfest;
import org.gdgbologna.resources.Talk;

import com.google.android.apps.analytics.GoogleAnalyticsTracker;

import android.app.Application;
import android.util.Log;

public class ApplicationDevFest extends Application {
	
	GoogleAnalyticsTracker tracker;	
	Talk selected;
	
	
	
	@Override
	public void onCreate() {
		super.onCreate();
		
		
		
		tracker = GoogleAnalyticsTracker.getInstance();
		String tracking_id = getResources().getString(R.string.tracking_id);
		Log.i("DEVFEST",tracking_id+"");
	    tracker.startNewSession(tracking_id, this);
	}

	public int dpiToPixel(int dpi){
		// Get the screen's density scale
		final float scale = getResources().getDisplayMetrics().density;
		// Convert the dps to pixels, based on density scale
		return (int) (dpi * scale + 0.5f);
	}

}
